package com.xinghen.validate;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @author xinghen
 * @ClassName: MyConstraintValidator
 * @Package: com.xinghen.validate
 * @Description TODO
 * @create 2018/04/08 20:54
 */
public class MyConstraintValidator implements ConstraintValidator<MyValid, Object> {

    @Override
    public void initialize(MyValid myValid) {

    }

    @Override
    public boolean isValid(Object parameter, ConstraintValidatorContext constraintValidatorContext) {
        System.out.println(parameter);
        System.out.println(constraintValidatorContext.getDefaultConstraintMessageTemplate());
        return true;
    }
}
